package com.devicemantra.coordinate.dataobjects;

import javax.jdo.annotations.*;

import java.util.*;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable ="true")
public class CPoint 
{
	@PrimaryKey
    @Persistent (valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key mLocationKey;
	
	@Persistent(defaultFetchGroup="true")
	private Double mLatitude;
	
	@Persistent(defaultFetchGroup="true")
	private Double mLongitude;
	
	public CPoint(Double pLatitude, Double pLongitude)
	{
		mLatitude = pLatitude;
		mLongitude = pLongitude;
		//mLocationKey = KeyFactory.createKey(CLocation.class.getSimpleName(),mLocationId);
		System.out.println("CREATED Location Latitude -  " + pLatitude + "Longitude - " + pLongitude);
		//System.out.println("KEY is [ " + KeyFactory.keyToString(mLocationKey) + " ]" );
	}
	
	public Double getLatitude()
	{
		return mLatitude;
	}
	
	public Double getLongitude()
	{
		return mLongitude;
	}
	
	
		
}
